package com.finace.money.common.util;

import com.finace.money.common.Constant;
import com.finace.money.data.bean.StatusListBean;

import java.util.List;

/**
 * Created by zhangpeng on 2018/1/16.
 */

public class ChooseUtil {
    /**
     * 获取自选数量
     *
     * @return 数量
     */
    public static int getChooseCount() {

        int count = 0;
        List<StatusListBean> data = (List<StatusListBean>) ACache.get(UIUtil.getContext()).getAsObject(Constant.CHOOSE_ALL);
        if (null != data && data.size() > 0) {
            for (StatusListBean bean : data) {
                if (bean.getCheck()) {
                    count++;
                }
            }
        }
        return count;

    }
}
